package com.ukao.pad.consts;

import android.content.Context;

import com.ukao.pad.utils.SpUtils;
import com.ukao.pad.utils.Utils;

import static cn.jiguang.analytics.android.api.JAnalyticsInterface.mContext;
import static com.ukao.pad.R.id.mercInfo;


/**
 * Created by Administrator on 2017/2/23.
 */

public class SaveParamets {

    public static  boolean isRfidLabel() {

        return (boolean) SpUtils.get(Utils.getContext(), "rfidLabel",false);

    }

    public  static void setRfidLabel(boolean rfidLabel) {

        SpUtils.put(Utils.getContext(), "rfidLabel",rfidLabel);
    }



    public  static  boolean isAutoPutaway() {

        return  (boolean) SpUtils.get(Utils.getContext(), "isAutoPutaway", false);
    }

    /**
     * 保存 是否是自动上架
     * @param autoPutaway
     */
    public  static void setAutoPutaway(boolean autoPutaway) {

        SpUtils.put(Utils.getContext(),"isAutoPutaway",autoPutaway);
    }

    public static  int  getOrderEnter() {


        return (int) SpUtils.get(Utils.getContext(), "orderEnters", 1);
    }

    //.1批次入厂 2.订单入厂  3衣物入厂
    public static  void setOrderEnter(int  inType) {

    SpUtils.put(Utils.getContext(), "orderEnters", inType);
}

    public static void setAccount(String account) {
        SpUtils.put(Utils.getContext(),"account",account);

    }

    public static String getAccount( ) {
    return     SpUtils.get(Utils.getContext(),"account","").toString();

    }


    public  static String getMercInfo() {
        return  SpUtils.get(Utils.getContext(),"mercInfo","").toString();

    }

    public static void setMercInfo(String mercInfo) {
        SpUtils.put(Utils.getContext(),"mercInfo",mercInfo);

    }

    public  static String getStoreName() {
        return  SpUtils.get(Utils.getContext(),"storeName","").toString();

    }

    public static  void setStoreName(String storeName) {

        SpUtils.put(Utils.getContext(),"storeName",storeName);
    }

    public static   String getCreateTimep() {


        return  SpUtils.get(Utils.getContext(),"createTimep","").toString();

    }

    /**
     *
     * @param  createTimep 創建時間
     */
    public static   void setCreateTimep(String createTimep) {
        SpUtils.put(Utils.getContext(), "createTimep",createTimep);
    }

    public  static String getAddrDesc() {

        return  SpUtils.get(Utils.getContext(),"addrDesc","").toString();
    }

    /**
     *
     * @param addrDesc  地址
     */
    public static   void setAddrDesc(String addrDesc) {
        SpUtils.put(Utils.getContext(), "addrDesc", addrDesc);
    }


    public  static String getRegionalDesc() {

        return   SpUtils.get(Utils.getContext(), "regionalDesc", "").toString();
    }

    public static  void setRegionalDesc(String regionalDesc) {

        SpUtils.put(Utils.getContext(), "regionalDesc", "");
    }



    public  static  String getCode() {

        return  SpUtils.get(Utils.getContext(),"codes","").toString();
    }

    public static  void setCode(Context mContext,String code) {

        SpUtils.put(mContext,"codes",code);
    }



    public static void saveHeadimgPath(Context mContext, String phone) {
        SpUtils.put(mContext, "imgPath", phone);

    }
    public static String getHeadimgPath(Context mContext ) {
        return   SpUtils.get(mContext, "imgPath", "").toString();

    }

    public static void saveUsePhone(Context mContext, String phone) {
        SpUtils.put(mContext, "phone", phone);

    }
    public static void saveloginSign(Context mContext, String loginSign) {
        SpUtils.put(mContext, "loginSign", loginSign);

    }
    public static String getsaveloginSign(Context mContext ) {
      return  SpUtils.get(mContext, "loginSign", "").toString();

    }


    public static void setIsLogin(boolean islogin) {
        SpUtils.put(Utils.getContext(), "islogin", islogin);

    }

    /**
     * 获得是否登陆
     * @return
     */
    public static boolean getIsLogin() {
        return  (boolean) SpUtils.get(Utils.getContext(), "islogin", false);
    }

    public static void saveUseName(Context mContext, String name) {
        SpUtils.put(mContext, "name", name);

    }
    public static void saveToken(Context mContext, String token) {
        SpUtils.put(mContext, "token", token);

    }

    public static String getToken(Context mContext ) {
    return      SpUtils.get(mContext,"token","" ).toString();

    }

    public static String getSaveUseName(Context mContext) {

        return SpUtils.get(mContext,"name", "").toString();
    }


    public static String getSaveUsePhone(Context mContext ) {

     return   SpUtils.get(mContext, "phone", "").toString();

    }



    public static int getVal( ) {

        return (int) SpUtils.get(Utils.getContext(),"val", -1);
    }


    public static  void setVal( int  val ) {

     SpUtils.put(Utils.getContext(), "val",val );

    }


    public  static  String getValname() {
        return   SpUtils.get(Utils.getContext(), "valname", "").toString();
    }

    public static  void setValname(String valname) {

        SpUtils.put(Utils.getContext(), "valname",valname );
    }



}
